// eslint-disable-next-line import/prefer-default-export
export const shortcuts = [
  {
    text: '长期有效',
    value: () => {
      return [new Date(), new Date('2038/01/01 00:00:00')];
    },
  },
  {
    text: '一周',
    value: () => {
      const start = new Date(new Date().setHours(0, 0, 0, 0));
      const end = new Date(new Date().setHours(0, 0, 0, 0));
      end.setTime(start.getTime() + 3600 * 1000 * 24 * 7 - 1);
      return [start, end];
    },
  },
  {
    text: '一个月',
    value: () => {
      const start = new Date(new Date().setHours(0, 0, 0, 0));
      let end = new Date(new Date().setHours(0, 0, 0, 0));
      // end.setTime(stargt.getTime() + 3600 * 1000 * 24 * 30)
      end = new Date(end.setMonth(end.getMonth() + 1));
      return [start, end];
    },
  },
  {
    text: '三个月',
    value: () => {
      const start = new Date(new Date().setHours(0, 0, 0, 0));
      let end = new Date(new Date().setHours(0, 0, 0, 0));
      end = new Date(end.setMonth(end.getMonth() + 3));

      // end.setTime(stargt.getTime() + 3600 * 1000 * 24 * 7)
      return [start, end];
    },
  },
  {
    text: '半年',
    value: () => {
      const start = new Date(new Date().setHours(0, 0, 0, 0));
      let end = new Date(new Date().setHours(0, 0, 0, 0));
      end = new Date(end.setMonth(end.getMonth() + 6));
      // end.setTime(stargt.getTime() + 3600 * 1000 * 24 * 7)
      return [start, end];
    },
  },
  {
    text: '一年',
    value: () => {
      const start = new Date(new Date().setHours(0, 0, 0, 0));
      const end = new Date(new Date().setHours(0, 0, 0, 0));
      end.setTime(start.getTime() + 3600 * 1000 * 24 * 365);
      return [start, end];
    },
  },
];
